<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_medal.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Mall_medal.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '勋章列表',
        name: 'Mall_medal',
        url: '/Mall_medal/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        medalicon: [],
        medalname: '',
        medaltype: '',
        medaldes: '',
        modifier: '',
        modifyDate: '',
        modifyID: '',
        createDate: '',
        createID: '',
        creator: '',
      },
      editFormOptions: [
        [{ title: '图标', field: 'medalicon', type: 'imgupgrade', maxSize: 1, maxFile: 1, multiple: true }],
        [{ title: '名称', field: 'medalname', type: 'text', required: true }],
        [{ title: '分类', field: 'medaltype', type: 'select', dataKey: 'medal_type', data: [], required: true }],
        [{ title: '描述', field: 'medaldes', type: 'textarea' }],
      ],
      searchFormFields: { medalname: '', medaltype: '' },
      searchFormOptions: [
        [
          { title: '名称', field: 'medalname', type: 'text' },
          { title: '分类', field: 'medaltype', type: 'text' },
        ],
      ],
      columns: [
        //    {field:'id',title:'id',type:'int',width:90,align:'left'},
        { field: 'medalicon', title: '图标', type: 'imgupgrade', width: 120, align: 'left' },
        { field: 'medalname', title: '名称', type: 'string', width: 120, align: 'left' },
        { field: 'medaltype', title: '所属分类', type: 'int', width: 90, align: 'left', bind: { key: 'medal_type', data: [] } },
        //    {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
        //    {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 190, align: 'left', sortable: true },
        //    {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
        { field: 'creator', title: '创建人', type: 'string', width: 100, align: 'left' },
        { field: 'modifier', title: '修改人', type: 'string', width: 100, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 190, align: 'left', sortable: true },
        { field: 'medaldes', title: '描述', type: 'string', width: 120, align: 'left' },
        //    {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'}
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
